package phapp.model.system;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: ts_version_info 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Version extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_TIME = DATE_TIME_FORMAT;

   // columns START
   /** versionId */
   private java.lang.Integer versionId;
   /** versionNumber */
   private java.lang.String versionNumber;
   /** systemType */
   private java.lang.String systemType;
   /** terminalType */
   private java.lang.String terminalType;
   /** versionUrl */
   private java.lang.String versionUrl;
   /** versionFile */
   private java.lang.String versionFile;
   /** fileSize */
   private java.lang.Integer fileSize;
   /** baseimgUrl */
   private java.lang.String baseimgUrl;
   /** baseimgFile */
   private java.lang.String baseimgFile;
   /** versionDesc */
   private java.lang.String versionDesc;
   /** versionStatus */
   private java.lang.Integer versionStatus;
   /** createTime */
   private java.sql.Timestamp createTime;
   /** updateTime */
   private java.sql.Timestamp updateTime;

   private java.util.ArrayList idList;

   // columns END

   public Version()
   {
   }

   public Version(java.lang.Integer versionId)
   {
      this.versionId = versionId;
   }

   public void setId(java.lang.Integer value)
   {
      this.versionId = value;
   }

   public java.lang.Integer getId()
   {
      return this.versionId;
   }
   
   public void setVersionId(java.lang.Integer value)
   {
      this.versionId = value;
   }

   public java.lang.Integer getVersionId()
   {
      return this.versionId;
   }

   public void setVersionNumber(java.lang.String value)
   {
      this.versionNumber = value;
   }

   public java.lang.String getVersionNumber()
   {
      return this.versionNumber;
   }

   public void setSystemType(java.lang.String value)
   {
      this.systemType = value;
   }

   public java.lang.String getSystemType()
   {
      return this.systemType;
   }

   public void setTerminalType(java.lang.String value)
   {
      this.terminalType = value;
   }

   public java.lang.String getTerminalType()
   {
      return this.terminalType;
   }

   public void setVersionUrl(java.lang.String value)
   {
      this.versionUrl = value;
   }

   public java.lang.String getVersionUrl()
   {
      return this.versionUrl;
   }

   public void setVersionFile(java.lang.String value)
   {
      this.versionFile = value;
   }

   public java.lang.String getVersionFile()
   {
      return this.versionFile;
   }

   public void setFileSize(java.lang.Integer value)
   {
      this.fileSize = value;
   }

   public java.lang.Integer getFileSize()
   {
      return this.fileSize;
   }

   public void setBaseimgUrl(java.lang.String value)
   {
      this.baseimgUrl = value;
   }

   public java.lang.String getBaseimgUrl()
   {
      return this.baseimgUrl;
   }

   public void setBaseimgFile(java.lang.String value)
   {
      this.baseimgFile = value;
   }

   public java.lang.String getBaseimgFile()
   {
      return this.baseimgFile;
   }

   public void setVersionDesc(java.lang.String value)
   {
      this.versionDesc = value;
   }

   public java.lang.String getVersionDesc()
   {
      return this.versionDesc;
   }

   public void setVersionStatus(java.lang.Integer value)
   {
      this.versionStatus = value;
   }

   public java.lang.Integer getVersionStatus()
   {
      return this.versionStatus;
   }

   public String getCreateTimeString()
   {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }

   public void setCreateTimeString(String value)
   {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME, java.sql.Timestamp.class));
   }

   public void setCreateTime(java.sql.Timestamp value)
   {
      this.createTime = value;
   }

   public java.sql.Timestamp getCreateTime()
   {
      return this.createTime;
   }

   public String getUpdateTimeString()
   {
      return date2String(getUpdateTime(), FORMAT_UPDATE_TIME);
   }

   public void setUpdateTimeString(String value)
   {
      setUpdateTime(string2Date(value, FORMAT_UPDATE_TIME, java.sql.Timestamp.class));
   }

   public void setUpdateTime(java.sql.Timestamp value)
   {
      this.updateTime = value;
   }

   public java.sql.Timestamp getUpdateTime()
   {
      return this.updateTime;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("VersionId", getVersionId()).append("VersionNumber", getVersionNumber()).append("SystemType", getSystemType()).append("TerminalType", getTerminalType()).append("VersionUrl", getVersionUrl())
               .append("VersionFile", getVersionFile()).append("FileSize", getFileSize()).append("BaseimgUrl", getBaseimgUrl()).append("BaseimgFile", getBaseimgFile()).append("VersionDesc", getVersionDesc()).append("VersionStatus", getVersionStatus())
               .append("CreateTime", getCreateTime()).append("UpdateTime", getUpdateTime()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getVersionId()).append(getVersionNumber()).append(getSystemType()).append(getTerminalType()).append(getVersionUrl()).append(getVersionFile()).append(getFileSize()).append(getBaseimgUrl()).append(getBaseimgFile())
               .append(getVersionDesc()).append(getVersionStatus()).append(getCreateTime()).append(getUpdateTime()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if (obj instanceof Version == false) return false;
      if (this == obj) return true;
      Version other = (Version) obj;
      return new EqualsBuilder().append(getVersionId(), other.getVersionId()).append(getVersionNumber(), other.getVersionNumber()).append(getSystemType(), other.getSystemType()).append(getTerminalType(), other.getTerminalType())
               .append(getVersionUrl(), other.getVersionUrl()).append(getVersionFile(), other.getVersionFile()).append(getFileSize(), other.getFileSize()).append(getBaseimgUrl(), other.getBaseimgUrl()).append(getBaseimgFile(), other.getBaseimgFile())
               .append(getVersionDesc(), other.getVersionDesc()).append(getVersionStatus(), other.getVersionStatus()).append(getCreateTime(), other.getCreateTime()).append(getUpdateTime(), other.getUpdateTime()).isEquals();
   }
}
